package org.jeecg.modules.common.baseentity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.config.mybatis.TenantContext;
import org.jeecgframework.poi.excel.annotation.Excel;
@Data
@NoArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@SuperBuilder(toBuilder = true)
public class BaseTenant {
    /**自增ID*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "教师自增ID")
    public String id;
    /**学校编码（租户id）*/
    @Excel(name = "学校编码（租户id）", width = 15)
    @ApiModelProperty(value = "学校编码（租户id）")
    @Dict(dicCode = "id",dicText = "name",dictTable = "sys_tenant")
    public String tenantId =  TenantContext.getTenant() ;
}
